package com.td.erhome.ui.sellhouse;

import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.td.erhome.R;
import com.td.erhome.base.BaseActivity;
import com.td.erhome.utils.ConstUtils;
import com.td.erhome.utils.RxBus;
import com.td.erhome.utils.UserManager;

import butterknife.Bind;
import butterknife.OnClick;

import static com.td.erhome.R.id.progressBar1;

public class PublishFinishActivity extends BaseActivity {

    @Bind(R.id.back)
    ImageView mBack;
    @Bind(R.id.tv_jd)
    TextView mTvJd;
    @Bind(progressBar1)
    ProgressBar mProgressBar1;
    @Bind(R.id.re_jd)
    RelativeLayout mReJd;
    @Bind(R.id.tv_gx)
    TextView mTvGx;
    @Bind(R.id.img_sure)
    ImageView mImgSure;
    private String mHouse_id;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_publish_finish;
    }

    @Override
    protected void initView() {
        mHouse_id = getIntent().getStringExtra("house_id");

        mProgressBar1.setProgress(UserManager.getIns().getPer());
        mTvJd.setText("完善度"+UserManager.getIns().getPer()+"%");

    }

    @Override
    protected void releaseResource() {
        UserManager.getIns().clearPer();
    }
    @OnClick({R.id.back, R.id.tv_jd, progressBar1, R.id.img_sure})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.back:
                finish();
                break;
            case R.id.img_sure:
                Intent intent = new Intent(this,MyPublishActivity.class);
                startActivity(intent);
                RxBus.getInstance().post(ConstUtils.OUT);
                finish();
                break;
        }
    }
}
